
<template>
<div class="page">
  <!-- 倒计时 -->
  <div class="buytime">
    <comp-countdown linebreak="linebreak"></comp-countdown>
  </div>
  <!-- 登录 -->
  <comp-login :user="user"></comp-login>
  <!-- 按钮 -->
  <div v-if="user" class="index-btn">
    <div> <a  id="btn-buy" @click="fire">
    <!-- <img src="/car/longhu/img/v1/按钮-开始抢购-04.png"> -->
    开始抢购
    </a>  </div>
    <div > 
    <a  id="btn-yh" href="javascript:showYh();" class="button button-orange button-diy">优惠公示</a>
    </div>
    <div > 
    <a  id="btn-yh" href="javascript:myCar();" class="button button-orange button-diy">认购查询</a>
    </div>
    <!-- <div> <a  class="index-btn_a"><img src="mp/temp/index_btn_list.png"></a> </div> -->
  </div>
</div>
</template>
<style type="text/css" lang="less" scoped>
  .page{
    position: absolute;
    top: 0;
    left: 0;
    overflow: auto;
    right: 0;
    bottom: 3.5rem;
    text-align: center;
    z-index: 1000;
    background-image: url(http://bxnjzsdc-boxun.stor.sinaapp.com/201705/10/341e494dd7ec133d6fe4638fde6354fa.jpg);
    background-size: 100% 100%;
    .buytime {
      top: 18%;
      left: 10%;
      position: absolute;
    }
    .index-btn{
      top: 46%;
      left: 10%;
      position: absolute;
      #btn-buy{
        background: url('http://bxnjzsdc-car.stor.sinaapp.com/public/btn.yellow.blank.png') no-repeat;
        cursor: pointer;
        background-size: 100% 100%;
        display: block;
        width: 14rem;
        height: 5rem;
        line-height: 5rem;
        font-size: 1.4rem;
        color: #862102;
        font-weight: 700;
        margin-left: -.7rem;
        text-align: center;
      }
      &>div{
        display: block;
        text-align: left;
      }
      a{
          text-decoration: none;
      }
    }
  }
</style>
<script>
import CompLogin from '../components/login.vue'
import CompCountdown from '../components/countdown.vue'
import {get,compNav} from '../public/js/utils.js'
export default {
  data: function () {
    this.init()
    return {
      msg: 'Hello world!',
    }
  },
  props:['user'],
  components:{
    CompLogin,
    CompCountdown
  },
  methods:{
    init(){
      // const r =await get('/public/microtime')
      // console.log(new Date().getTime())
      // console.log(new Date())
      // console.log(r)
      compNav(this)
    },
    fire:function(){
      this.jump('comp-rgxzagree')
    }
  }

}
</script>
